<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--1.表格示例
    1.1 border属性:为表格设置边框
    1.2 caption:表格标题
-->
<table border="1" style="border-collapse: collapse">
    <caption>爱好表</caption>

    <tr>
        <th>序号</th>
        <th>姓名</th>
        <th>爱好</th>
    </tr>
    <!--第1行-->
    <tr>
        <td>1</td>
        <td>传奇</td>
        <td>玩偶</td>
    </tr>
    <!--第2行-->
    <tr>
        <td>2</td>
        <td>伟超</td>
        <td>赵丽颖</td>
    </tr>
    <!--第3行-->
    <tr>
        <td>1</td>
        <td>硕博</td>
        <td>传奇</td>
    </tr>
</table>

<!--跨列合并和跨行合并-->
<table border="1px" style="border-collapse: collapse">
    <!--第1行-->
    <tr>
        <td>1-1</td>
        <td>1-2</td>
        <td>1-3</td>
        <td>1-4</td>
    </tr>
    <!--第2行-->
    <tr>
        <td colspan="2">2-1</td>
        <td>2-3</td>
        <td rowspan="3">2-4</td>
    </tr>
    <!--第3行-->
    <tr>
        <td>3-1</td>
        <td>3-2</td>
        <td>3-3</td>
    </tr>
    <!--第4行-->
    <tr>
        <td>4-1</td>
        <td>4-2</td>
        <td>4-3</td>
    </tr>
</table>
<br>

<table border="1px" style="border-collapse: collapse">
    <caption>购物车</caption>
    <tr>
        <th>商品编号</th>
        <th>商品名称</th>
        <th>商品价格</th>
    </tr>
    <tr>
        <td>1</td>
        <td>小米Air</td>
        <td>5877</td>
    </tr>
    <tr>
        <td>2</td>
        <td>华为遥遥领先</td>
        <td>8877</td>
    </tr>
    <tr>
        <td>总价:</td>
        <td colspan="2">10000</td>
    </tr>
</table>
<br>
<!--课程表练习-->
<table border="1px" style="border-collapse: collapse">
    <caption>课程表</caption>
    <tr>
        <th></th>
        <th>星期一</th>
        <th>星期二</th>
        <th>星期三</th>
        <th>星期四</th>
        <th>星期五</th>
    </tr>
    <!--1-->
    <tr>
        <td  rowspan="4">上<br>午</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--2-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--3-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--4-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--5-->
    <tr>
        <td colspan="6"></td>
    </tr>
    <!--6-->
    <tr>
        <td rowspan="3">下<br>午</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--7-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--8-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
</table>

<!--课程表练习-->
<table border="1px" style="border-collapse: collapse">
    <caption>课程表</caption>
    <tr>
        <th></th>
        <th>星期一</th>
        <th>星期二</th>
        <th>星期三</th>
        <th>星期四</th>
        <th>星期五</th>
    </tr>
    <!--1-->
    <tr>
        <td rowspan="4">上<br>午</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--2-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--3-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--4-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--5-->
    <tr>
        <td colspan="6">x</td>
    </tr>
    <!--6-->
    <tr>
        <td rowspan="3">下<br>午</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--7-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
    <!--8-->
    <tr>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
        <td>x</td>
    </tr>
</table>
</body>
</html>